package com.hotelvip.common.pojo;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * 封装token来替换Shiro原生Token，要实现AuthenticationToken接口
 * @author Lzh
 * @date 2020/12/3 10:50
 */
public class JWTToken implements AuthenticationToken {
    private static final long serialVersionUID = 6806500765461209744L;
    private String token;

    public JWTToken(String token) {
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
